package com.soulkun.smarthome.logic.service

import com.soulkun.smarthome.logic.dto.AlertMessageDTO
import com.soulkun.smarthome.logic.dto.FamilyMessageDTO
import com.soulkun.smarthome.logic.dto.RoomDeviceCommandDTO
import com.soulkun.smarthome.logic.model.*
import okhttp3.RequestBody
import retrofit2.Call
import retrofit2.http.*

interface ApiUserService {

    @Headers("Ignore-Token: true", "Anti-Replay: true")
    @POST("/user/login")
    fun login(@Body requestBody: UserModel): Call<ResponseModel<LoginModel>>

    @Headers("Ignore-Token: true")
    @POST("/user/register")
    fun register(@Body requestBody: UserModel): Call<ResponseModel<Any>>

    @Headers("Ignore-Token: false", "Need-Refresh: true")
    @GET("/user/logout")
    fun logout(): Call<ResponseModel<Any>>

    @Headers("Ignore-Token: false")
    @GET("/user/info/get")
    fun getUserInfo(): Call<ResponseModel<UserModel>>

    @Headers("Ignore-Token: false", "Anti-Replay: true")
    @POST("/user/nickname/modify")
    fun modifyUserNickname(@Body requestBody: UserModel): Call<ResponseModel<Any>>

    @Headers("Ignore-Token: true")
    @GET("/user/username/check")
    fun checkAvailableUserName(@Query("username") username: String): Call<ResponseModel<Any>>

    @Headers("Ignore-Token: false")
    @GET("/user/list/message/family")
    fun getFamilyMessageList(): Call<ResponseModel<List<FamilyMessageDTO>>>

    @Headers("Ignore-Token: false")
    @GET("/user/list/message/alert")
    fun getAlertMessageList(): Call<ResponseModel<List<AlertMessageDTO>>>

}